package Stack练习;

import java.util.Stack;

public class use_stack {
    public static void main(String[] args) {
        Stack<String> stack=new Stack<>();
        System.out.println(stack);
        System.out.println(stack.empty());
        System.out.println(stack.isEmpty());
        System.out.println(stack.size());
        System.out.println("=========================");

        stack.push("A");
        stack.push("B");
        stack.push("C");
        stack.push("D");
        System.out.println(stack);
        System.out.println(stack.empty());
        System.out.println(stack.isEmpty());
        System.out.println(stack.size());
        System.out.println("=========================");

        System.out.println(stack.peek());//
        System.out.println(stack);
        System.out.println("=========================");

        System.out.println(stack.pop());
        System.out.println(stack);




        Stack<Integer> stack1=new Stack<>();


    }


}
